package com.haoliang.spring.property.value.bean;

import org.springframework.beans.factory.annotation.Value;

/**
 * @Author zhaohaoliang
 * @Date 创建于 下午8:16 2019/3/10
 * @Description 请输入类的描述信息
 */
public class Person {

    //1、基本值
    //2、Spring EX[spring表达式]【#{}】
    //3、取配置文件的值【${},运行的环境变量中的值】

    @Value("张无忌")
    private String name;

    @Value("#{20-2}")
    private String description;

    @Value("${person.more}")
    private String more;

    public String getMore() {
        return more;
    }

    public void setMore(String more) {
        this.more = more;
    }

    public Person() {
    }

    public Person(String name, String description,String more) {
        this.name = name;
        this.description = description;
        this.more = more;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", description='" + description + '\'' +
                ", more='" + more + '\'' +
                '}';
    }
}
